﻿(function (ekb, $, undefined) {
    ekb.load = function (url) {
        this.post(
            url,
            null,
            this.showImage('contentLoading'),
            function (result) {
                ekb.appendText('div#container', result.responseText, false);
            });
    };
    ekb.del = function (url, id) {
        this.post(
            url,
            JSON.stringify({ id: id }),
            this.showImage('contentLoading'),
            function (result) {
                ekb.appendText('div#container', result.responseText, false);
            });
    };
    ekb.edit = function (url, id, type) {
        this.post(
            url,
            JSON.stringify({ id: id, type: type }),
            null,
            function (result) {
                ekb.appendText('div#edit', result.responseText, false);
                $('div#edit').dialog({
                    modal: true,
                    title: 'Edit'
                });
            });
    };
} (window.evekillboard = window.evekillboard || {}, jQuery));